package cn.edu.scau.cmi.lixiaoyuan.orm.hibernate.domain;

import java.util.HashSet;
import java.util.Set;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;


@Component
public class Student {
	
	private Long id;
	private Teacher teacher;
	private String name;
    private Long number;
	

	// Constructors

	public Long getNumber() {
		return number;
	}

	public void setNumber(Long number) {
		this.number = number;
	}

	/** default constructor */
	public Student() {
	}

	/** minimal constructor */
	public Student(Long id) {
		this.id = id;
	}

	/** full constructor */
	public Student(Long id, Teacher teacher, String name, Long number) {
		this.id = id;
		this.teacher = teacher;
		
		this.name = name;
		
	
	}

	// Property accessors

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Teacher getTeacher() {
		return this.teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Student [id=" + id + ", tutor=" + teacher.getId() + ", name=" + name + ", number=" + number + "]";
	}


	
	
}
